package main.java.com.negromotad.view.tableModelView;

public class TableModelViewDouble extends TableModelView {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2769244999409713063L;

	public TableModelViewDouble(final String[] cols, final Double[][] datos) {
		super(cols);
		this.setTableModelCol(datos);
	}

	final private void setTableModelCol(Double[][] datos) {
		final int colsLength = this.getColumnCount();
		final Object[][] data = new Object[datos.length][colsLength];
		for (int i = 0; i < data.length; i++) {
			data[i][0] = i + 1;
		}
		for (int i = 1; i < colsLength; i++) {
			for (int j = 0; j < data.length; j++) {
				data[j][i] = new Double(datos[j][i - 1].doubleValue());
			}
		}
		this.setData(data);

	}

}
